			
// 针对IE7不能正确显示margin-right的特殊处理,必须通过代码设置
//$("bodyContainer").style.marginRight = "10px";
function externalInit()
{
	// 去掉menubar多余的边线
	var menubar1Comp = getComponent("menubar1");
	if(menubar1Comp != null)
	{
		menubar1Comp.Div_gen.style.borderRight = "none";
		menubar1Comp.Div_gen.style.borderLeft = "none";
		menubar1Comp.Div_gen.style.borderTop = "none";
	}
	
	var menubar2Comp = getComponent("menubar2");
	if(menubar2Comp != null)
	{
		menubar2Comp.Div_gen.style.borderRight = "none";
		menubar2Comp.Div_gen.style.borderLeft = "none";
		menubar2Comp.Div_gen.style.borderTop = "none";
	}
	
	var menubarBody = getComponent("menubar_body");
	if(menubarBody != null)
	{
		menubarBody.Div_gen.style.border = "none";
		menubarBody.Div_gen.style.background = "transparent";
	}
	if(typeof postInit != 'undefined')
		postInit();
}

function globalBeforeOpenRefDialog(refComp) {
	var ds = getDataset('jk_jkzb');
	var row = ds.getSelectedRow();
	var valueArr = new StringBuffer("");
	var rowSize = row.getSize();

	//如果是参照的名称字段，则设置为空，为了url长度 < 2k
	var refIndexMap = new HashMap();
	var meta = ds.metadata;
	for(var t = 0, count = meta.length; t < count; t++){	
		if(meta[t].refField1 != null && meta[t].refField1 != '')
			refIndexMap.put(t,t);
		if(meta[t].key == 'zyx10')
			refIndexMap.put(t,t);
	}
	
	for(var i = 0; i < rowSize; i ++){
		if(refIndexMap != null && refIndexMap.size != 0){
			if(refIndexMap.containsKey(i)){
				valueArr.append("");
				if(i != rowSize - 1)
					valueArr.append(",");
				continue;
			}
		}
		var value = row.getCellValue(i);
		if(value != null){
			valueArr.append(value);
		}
		if(i != rowSize - 1)
			valueArr.append(",");
	}
	return "rowValueArr=" + encodeURIComponent(valueArr.toString()) + "&djlxbm=" + getSessionAttribute("djlxbm") + "&djdl=jk";
}

function onBeforeDestroyPage()
{
	// 用户已经注销则不继续执行
	if(parent.$logoutflag != null && parent.$logoutflag == true)
		return false;
}

function specialCellLogicCheck(dataset, value, index, row) 
{ 
	return true;
}
function globalFormInitialized(form) {
	var div = $('outer_' + form.id);
	if(div == null)
		return;
	var height = form.getHeight();
	div.style.height = height;
}